package com.gg.registration.rabbitmq.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置消息转换器
 * Author：  chenjunjia
 * Date：    2022/4/25 16:59
 * WeChat：  China_JoJo_
 */
@Configuration
public class MQConfig {

    @Bean
    public MessageConverter messageConverter(ObjectMapper objectMapper){
        return new Jackson2JsonMessageConverter();
    }
    //默认是字符转换器
}